package com.csw.bootstrapjqgrid.dao;

import com.csw.bootstrapjqgrid.entity.Emp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 1
 */
@Mapper
public interface EmpDAO extends BaseDAO<Emp> {
    /**
     * 搜索
     *
     * @param searchField  searchField
     * @param searchString searchString
     * @param searchOper   searchOper
     * @param page         page
     * @param rows         rows
     * @return 0
     */
    List<Emp> findSearch(@Param("searchField") String searchField, @Param("searchString") String searchString,
                         @Param("searchOper") String searchOper, @Param("start") Integer page, @Param("rows") Integer rows);

    /**
     * 计数
     *
     * @param searchField  searchField
     * @param searchString searchString
     * @param searchOper   searchOper
     * @return 0
     */
    Long findTotalCountsSearch(@Param("searchField") String searchField, @Param("searchString") String searchString,
                               @Param("searchOper") String searchOper);
}
